package com.shallowUniverse.process.mapper;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.shallowUniverse.process.entity.ApprovalDetails;
import com.shallowUniverse.process.mapper.provider.ApprovalDetailsProvider;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;


/**
 * @author gs
 * @date create in 2020/12/11 16:27
 */
@Repository
public interface ApprovalDetailsMapper {

    @InsertProvider(type = ApprovalDetailsProvider.class, method = "save")
    int save(ApprovalDetails approvalDetails);

    @SelectProvider(type = ApprovalDetailsProvider.class, method = "selectList")
    List<ApprovalDetails> selectList(ApprovalDetails approvalDetails);

    @SelectProvider(type = ApprovalDetailsProvider.class, method = "selectById")
    ApprovalDetails selectById(Long id);

    @SelectProvider(type = ApprovalDetailsProvider.class, method = "deleteLogic")
    int deleteLogic(String id);

    @SelectProvider(type = ApprovalDetailsProvider.class, method = "delete")
    int delete(String id);

    @DeleteProvider(type = ApprovalDetailsProvider.class, method = "deleteByApprovalLogic")
    int deleteByApprovalLogic(String approvalId);

    @DeleteProvider(type = ApprovalDetailsProvider.class, method = "deleteByApproval")
    int deleteByApproval(String approvalId);

    @SelectProvider(type = ApprovalDetailsProvider.class, method = "selectList")
    IPage<ApprovalDetails> selectPageList(IPage<ApprovalDetails> page, ApprovalDetails approvalDetails);
}
